class Dog{
    String name;
    void bark() {
        System.out.println("小狗叫");
    }
    void eat() {
        System.out.println("小狗吃");
    }
    void chaseCat() {
        System.out.println("haha");
    }
}
public class TestDogDrive {
    public static void main(String[] args) {
        Dog[] pets;
        pets = new Dog[10];
        pets[0] = new Dog();
        pets[0].name = "Fido";
        pets[0].bark();
        pets[0].eat();
        pets[1] = new Dog();
    }
}
